package com.feisuanyz.pojo.dto;

import lombok.Data;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.groups.Default;
import jakarta.validation.constraints.NotBlank;
import io.swagger.v3.oas.annotations.media.Schema;

/**
 * 食物信息入参对象
 *
 * @author Chenke Zhao
 * @date 2025-03-06 10:18:05
 */
@Data
public class MealDTO {

    /**
     * 食物ID
     */
    @NotNull(groups = { DeleteGroup.class, UpdateGroup.class, Default.class }, message = "食物ID不能为空")
    @Schema(description = "食物ID")
    private Integer mealId;

    /**
     * 食物名称
     */
    @NotBlank(groups = { CreateGroup.class, Default.class }, message = "食物名称不能为空")
    @Schema(description = "食物名称")
    private String mealName;

    /**
     * 食物类型
     */
    @NotBlank(groups = { CreateGroup.class, UpdateGroup.class, Default.class }, message = "食物类型不能为空")
    @Schema(description = "食物类型")
    private String mealType;

    /**
     * 用户ID
     */
    @NotNull(groups = { CreateGroup.class, DeleteGroup.class, UpdateGroup.class, Default.class }, message = "用户ID不能为空")
    @Schema(description = "用户ID")
    private Integer userId;
}
